package com.ruoyi.merchantAccount.service.impl;

import com.ruoyi.common.core.text.Convert;
import com.ruoyi.merchant.domain.MpMerchantWallet;
import com.ruoyi.merchant.domain.MpMerchantWalletVo;
import com.ruoyi.merchant.mapper.MpMerchantWalletMapper;
import com.ruoyi.merchant.service.IMpMerchantWalletService;
import com.ruoyi.merchantAccount.domain.MpMerchantAccountWallet;
import com.ruoyi.merchantAccount.domain.MpMerchantAccountWalletVo;
import com.ruoyi.merchantAccount.mapper.MpMerchantAccountWalletMapper;
import com.ruoyi.merchantAccount.service.IMpMerchantAccountWalletService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 *  服务层实现
 * 
 * @author ruoyi
 * @date 2019-05-06
 */
@Service
public class MpMerchantAccountWalletServiceImpl implements IMpMerchantAccountWalletService
{
	@Autowired
	private MpMerchantAccountWalletMapper mpMerchantWalletMapper;

	/**
     * 查询信息
     * 
     * @param id ID
     * @return 信息
     */
    @Override
	public MpMerchantAccountWallet selectMpMerchantWalletById(Integer id)
	{
	    return mpMerchantWalletMapper.selectMpMerchantWalletById(id);
	}
	
	/**
     * 查询列表
     * 
     * @param mpMerchantWallet 信息
     * @return 集合
     */
	@Override
	public List<MpMerchantAccountWalletVo> selectMpMerchantWalletList(MpMerchantAccountWallet mpMerchantWallet)
	{
	    return mpMerchantWalletMapper.selectMpMerchantWalletList(mpMerchantWallet);
	}
	
    /**
     * 新增
     * 
     * @param mpMerchantWallet 信息
     * @return 结果
     */
	@Override
	public int insertMpMerchantWallet(MpMerchantAccountWallet mpMerchantWallet)
	{
	    return mpMerchantWalletMapper.insertMpMerchantWallet(mpMerchantWallet);
	}
	
	/**
     * 修改
     * 
     * @param mpMerchantWallet 信息
     * @return 结果
     */
	@Override
	public int updateMpMerchantWallet(MpMerchantAccountWallet mpMerchantWallet)
	{
	    return mpMerchantWalletMapper.updateMpMerchantWallet(mpMerchantWallet);
	}

	/**
     * 删除对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteMpMerchantWalletByIds(String ids)
	{
		return mpMerchantWalletMapper.deleteMpMerchantWalletByIds(Convert.toStrArray(ids));
	}

	@Override
	public MpMerchantAccountWallet checkMerchantWallet(MpMerchantAccountWallet mpMerchantWallet) {
		return mpMerchantWalletMapper.checkMerchantWallet(mpMerchantWallet);
	}
}
